{% extends "admin/layout.html" %}

{% block css %}
    <style>
        #auth_list .col-md-12,#auth_list .col-md-2{
            padding:0px;
        }
    </style>
{% endblock %}
{% block content %}
<section class="content-header">
    <h1>微电影管理系统</h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> 角色管理</a></li>
        <li class="active">编辑角色</li>
    </ol>
</section>
<section class="content" id="showcontent">
    <div class="row">
        <div class="col-md-12">
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">编辑角色</h3>
                </div>
                <form role="form" method="post">
                    {% include "admin/layout/flash_message.html" %}
                    <div class="box-body">
                        <div class="form-group">
                            <label for="input_name">角色名称</label>
                            {{ form.name(value=role.name) }}
                            {% include "admin/layout/name_error.html" %}
                        </div>
                        <div class="form-group" id="auth_list">
                            <div class="col-md-12">
                                <label>操作权限</label>
                            </div>
                            {{ form.auths }}
                        {% include "admin/layout/auths_error.html" %}
                        </div>
                    </div>
                    <div class="box-footer">
                        {{ form.csrf_token }}
                        {{ form.submit }}
                    </div>
                </form>
            </div>
        </div>
    </div>
</section>
{% endblock %}

{% block js %}
    <script>
        $(function(){
            $('#a-9').addClass("active");
            $('#a-9-1').addClass("active");
        })
    </script>
{% endblock %}